import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import axios from 'axios'
import 'font-awesome/css/font-awesome.min.css'
import qs from "qs";

// 将store和router挂载到路由实例中，方便全局使用
let app=createApp(App);
//全局挂载axios实例
axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded'
axios.defaults.baseURL="http://localhost:8080/";//对应tomcat的端口
//设置cross跨域 并设置访问权限 允许跨域携带cookie信息
axios.defaults.withCredentials=true;
// axios.defaults.headers = {
// 	'Content-Type': 'application/json;charset=UTF-8',
// 	'token':localStorage.getItem('token')
// }
app.config.globalProperties.$http = axios
//挂载qs
app.config.globalProperties.$qs = qs

app.use(store).use(router).mount('#app');

